function wiTabStart(name = null) {
  if (name == null) {
    throw "nam is null";
    return;
  }

  $(`div[wi-tab="${name}"] .list`).map((index, item) => {
    $(item).attr("wi-tab-index", index);

    $(`.${name}-${index}`).css("display", "none");
  });

  $(`.${name}-0`).css("display", "block");

  $(`div[wi-tab="${name}"] .list`).click(function() {
    let wiTabIndex = $(this).attr("wi-tab-index");
    $(`div[wi-tab="${name}"] .list`).map((index, item) => {
      $(item).removeClass("on");
      $(`.${name}-${index}`).css("display", "none");
    });

    $(this).addClass("on");
    $(`.${name}-${wiTabIndex}`).css("display", "block");
  });
}

wiTabStart("show");
wiTabStart("two");
wiTabStart("three");
wiTabStart("four");
wiTabStart("aa");
wiTabStart("bb");
wiTabStart("cc");
wiTabStart("dd");
wiTabStart("ee");
wiTabStart("ff");
wiTabStart("gg");

var swiper = new Swiper(".swiper-container", {
  loop : true,
  pagination: {
    el: ".swiper-pagination"
  },
  autoplay: {
	delay: 2000,
	disableOnInteraction: false,
  },  
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev"
  }
});
